
var view;

function checkLocale(language) {
alert("in func "+language);

if(language=="en"){
view = new Object();
alert("i am in english");
	view.strings = {
	START_MESSAGE: "Welcome to this demo!",
	NAME_LABEL: "Please enter your name and hit ...",
	PERSONALISED_MESSAGE_START: "Hello, ",
	PERSONALISED_MESSAGE_END: "!" 
	};

}

else if(language=="no"){
view = new Object();
view.strings = {
START_MESSAGE: "Velkommen til demo",
NAME_LABEL: "Skriv dit navn",
PERSONALISED_MESSAGE_START: "Hei,  ",
PERSONALISED_MESSAGE_END: "!" 
};
}

else{
alert ("your language is not supported, the default language will be set");
view = new Object();

	view.strings = {
	START_MESSAGE: "Velkommen du er i default language!",
	NAME_LABEL: "Please enter default language ...",
	PERSONALISED_MESSAGE_START: "Hello, ",
	PERSONALISED_MESSAGE_END: "!" 
	};
}

return view;
}

